validateEntry

Validates an input per the provided validation type.

  • ValidationType.WEAK the validator should not interact with game state; this validation is being requested before the game is fully set up.

  • ValidationType.STRONG validation is happening in-game, so can make use of game state as needed.

Return

ValidationResult<T> the input wrapped with either success or failure plus applicable error message, if any. If validation fails, the error should attempt to indicate how validation can be achieved. For example, in a number range 1 to 10, if the user enters 12 the message could be something like "12 outside the valid range 1 to 10"

Author

fzzyhmstrs

Since

0.2.0

Parameters

input

Input object to validate

type

The current ValidationType